﻿@using DTcms.Web.Mvc.UI.Controllers;
@model DTcms.Model.BaseModel
@{
    var c = new BaseController();
    ViewBag.Title = "投诉建议-" + Model.site.name;
    var feedbackLists = new DTcms.Web.Plugin.Feedback.feedback().get_feedback_list(10, Model.page, "", out Model.totalcount);
    string pagelist = c.get_page_link(10, Model.page, Model.totalcount, "feedback", "__id__");
    string templateskin = Model.templateskin;
}
<div class="container">
    <section>
        <div id="comment-form" class="article_comment" data-belongId="0" data-commentType="留言" data-table="feedback">
            <div class="comment-area" id="Comment">
                <h4 class="index-title translucent h4-tit pd15 afterbg mb25">共有<span class="t-orange">@Model.totalcount</span>条评论<a href="#myform" rel="nofollow"><i class="el-edit"></i>发表评论</a></h4>
                <ul>
                    @{
                        int i = 0;
                        foreach (var dr in feedbackLists)
                        {
                            i++;
                            <li id="comment-@i" class="comment-item translucent pd20 afterbg">
                                <span class="louceng">@i#</span>
                                <div class="comment-ava userava img-circle">
                                    <a href="@dr.web" id="Comment@(i)" target="_blank" rel="nofollow" title="@(dr.web!=""?"去"+dr.user_name+"的网站看看 ?":"没有登记网站！")">
                                        <img src="@Model.templateskin/images/avatar_45.png" data-original="/style/images/ArticleImg/@dr.img_url" class="comment-tx circle">
                                    </a>
                                </div>
                                <div class="comment-info ">
                                    <div class="comment-line ">
                                        <ul class="ft12 pc_comment_line">
                                            <li><i class="layui-icon layui-icon-username"></i><a title="@dr.web" class="comment-name">@dr.user_name</a></li>
                                            <li class="mob-move"><i class="layui-icon layui-icon-log"></i><a title="发表于@(dr.add_time)" class="comment-time">@dr.add_time</a></li>
                                            <li class="mob-move"><i class="el-map-marker"></i><a title="@(dr.add_time)当前位于:@(dr.city)" class="comment-map">@(dr.city)</a></li>
                                            <li class="mob-move"><i class="el-screen"></i><a class="comment-map">@dr.system</a></li>
                                        </ul>
                                    </div>
                                    <div class="comment-content mt10 mb10 replace_face">
                                        @dr.content
                                    </div>
                                    <div class="comment-line">
                                        <!--回复-->
                                        @if (dr.reply_content.ToString() != "")
                                        {
                                            <ul class="re-comment">
                                                <li>
                                                    <div class="admin-ava userava circle">
                                                        <img src="@templateskin/images/avatar_45.png" alt="@Model.site.company" title="@Model.site.company" class="circle">
                                                    </div>
                                                    <div class="re-info">
                                                        <span><a><img src="@templateskin/images/ok.png">@Model.site.company</a><time>@c.datetostr(dr.add_time,"yyyy-MM-dd")</time> 回复 <a>@@@dr.user_name</a></span>
                                                        <div class="re-content replace_face">
                                                            @Html.Raw(dr.reply_content)
                                                        </div>
                                                    </div>
                                                </li>
                                            </ul>
                                        }
                                    </div>
                                </div>
                            </li>
                        }
                    }
                </ul>
                <div class="pageNavigation">@Html.Raw(pagelist)</div>
            </div>
            <div class="links-section write2014">
                <form id="myform" url="/plugin/feedback/feedback_add" class="layui-card-body layui-form layui-form-pane">
                    <div class="layui-form-item">
                        <label class="layui-form-label"><i class="layui-icon layui-icon-username"></i></label>
                        <div class="layui-input-block">
                            <input name="u_name" type="text" id="u_name" class="layui-input" value="" maxlength="16" placeholder="您的昵称（必须）" sucmsg=" " datatype="*1-16" nullmsg="请填写您的昵称！" />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><i class="layui-icon layui-icon-cellphone"></i></label>
                        <div class="layui-input-block">
                            <input name="u_tel" type="text" id="u_tel" class="layui-input" value="" datatype="*0-20" sucmsg=" " placeholder="联系电话（选填）" />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><i class="layui-icon layui-icon-login-qq"></i></label>
                        <div class="layui-input-block">
                            <input name="u_qq" type="text" id="u_qq" class="layui-input" value="" datatype="*0-20" sucmsg=" " placeholder="在线QQ（选填）" />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><i class="layui-icon layui-icon-release"></i></label>
                        <div class="layui-input-block">
                            <input name="u_mail" type="text" id="u_mail" class="layui-input" value="" placeholder="您的邮箱（必填）" sucmsg=" " datatype="e" nullmsg="请填写您的邮箱！" />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><i class="layui-icon layui-icon-website"></i></label>
                        <div class="layui-input-block">
                            <input name="u_url" type="text" id="u_url" class="layui-input" value="" placeholder="您的网站（选填）" datatype="/^\s*$|^([a-zA-Z0-9\-\u4e00-\u9fa5]+\.)+[a-zA-Z\u4e00-\u9fa5]+$/" errormsg="请输入正确的域名！" sucmsg=" " />
                            <span class="Validform_checktip">域名去除“http://”部分。</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><i class="layui-icon layui-icon-dialogue"></i></label>
                        <div class="layui-input-block">
                            <textarea name="content" id="content" style="display:none" maxlength="600" sucmsg=" " datatype="*5-600" nullmsg="请填写留言内容！"></textarea>
                            <div class="cmt_txt" id="cmt_txt" name="cmt_txt" contenteditable="true"></div>
                            <div class="cmt_control clearfix">
                                <div class="left">
                                    <div class="emot po_re">
                                        <a href="#" onClick="return insertEmot(this,'cmt_txt');" class="emot_btn">插入表情</a>
                                    </div>
                                </div>
                                <div class="right">文明上网 礼貌发帖　<span id="cmt_tip">0/600</span></div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><i class="layui-icon layui-icon-vercode"></i></label>
                        <div class="layui-input-block">
                            <input name="code" type="text" placeholder="验证码" class="layui-input" style="width:110px" sucmsg=" " datatype="s4-4" errormsg="请填写4位验证码" nullmsg="请填写验证码！" />
                            <span onclick="ToggleCode(this, '/verify_code/code?width=80&height=36');return false;" title="看不清楚？点击刷新">
                                <img class="login-captcha" src="/verify_code/code?width=80&height=36">
                            </span>
                        </div>
                    </div>
                    <input name="site" type="hidden" value="@Model.site.id" />
                    <input type="hidden" value="" id="fd_position" name="fd_position" />
                    <div class="feed-sub"><input type="submit" class="btn btn-inverse sub-fd" id="cmt_btn" value="提交评论" /></div>
                </form>
            </div>
        </div>
    </section>
    @Html.Partial("_myaside")
</div>
@section Scripts{
    <script type="text/javascript" src="@Model.templateskin/js/comments2014.js"></script>
    <script type="text/javascript" src="@Model.templateskin/js/emotdata.js"></script>
    <script type="text/javascript">
        layui.use(['validform', 'form'], function () {
            $("#myform").initValidTextarea(600, "cmt_txt", "cmt_tip", "cmt_btn", "content");
        });
    </script>
}